/**
 * 
 */
package com.ljw.ebay.api.find;

import com.ebay.services.client.ClientConfig;
import com.ebay.services.client.FindingServiceClientFactory;
import com.ebay.services.finding.FindingServicePortType;
import com.ljw.ebay.api.tools.EbayAPIConfigTools;
import com.ljw.ebay.api.tools.EbayAPIConstants;

/**
 * @author lou 2012-6-10 loujianwen@qianpin.com
 */
public class APIServiceClientFactory {
	private static final ClientConfig clientConfig = new ClientConfig();
	private static FindingServicePortType findServiceClient = null;

	private APIServiceClientFactory() {
	}

	public static FindingServicePortType getFindServiceClient() {
		if (findServiceClient == null) {
			clientConfig.setApplicationId(EbayAPIConfigTools
					.getAPIConstants(EbayAPIConstants.AppID_Product));
			findServiceClient = FindingServiceClientFactory
					.getServiceClient(clientConfig);
		}

		return findServiceClient;
	}
}
